{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 简单线性回归"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from sklearn import datasets\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "boston = datasets.load_boston()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['CRIM', 'ZN', 'INDUS', 'CHAS', 'NOX', 'RM', 'AGE', 'DIS', 'RAD',\n",
       "       'TAX', 'PTRATIO', 'B', 'LSTAT'],\n",
       "      dtype='<U7')"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "boston.feature_names"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "x = boston.data[:, 5]\n",
    "y = boston.target"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(506,)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(506,)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "50.0"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.max(y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJztnX+QHOWZ37/Pjho0i8+MwGsHBmTh\nS0q643RizZYhpypXJF9QbGy8Eb9M4SuScoX84UqMTe1ZTjlGXJGgi3KB++PKV5SdHCl8WCDsNZg6\ny1eGS+qoAkdi2eN0oLrYgOQRMfKhwUYaxOzukz9mejQz22/32z39e76fKtWuZqa7n+7e+b5vP8/z\nPo+oKgghhBSfiawNIIQQEg8UdEIIKQkUdEIIKQkUdEIIKQkUdEIIKQkUdEIIKQkUdEIIKQkUdEII\nKQkUdEIIKQlr0jzY+973Pt2wYUOahySEkMJz6NChX6jqVNDnUhX0DRs24ODBg2kekhBCCo+IvGbz\nObpcCCGkJFDQCSGkJFDQCSGkJFDQCSGkJFDQCSGkJFhluYjIqwB+BWAZwJKqzojIBQD2AdgA4FUA\nN6nqyWTMJKMyv9DA3gNHcLzZwsW1KuZ2bMTsdD1rs0Yi7nNK8xrFeay0721cx3P302i2UBHBsmrv\n56QzgdbSClSBighuuepS3DO7eeTjD2+7bdMUnn75RKz3of986il/18SmY1FX0GdU9Rd9r/0XAG+q\n6h4R2QVgnap+2W8/MzMzyrTF9JlfaOAr33kRrfZy77WqU8G9OzcXVtTjPqc0r1Gcx0r73sZ1PK/9\nBPHZq9dj5oMXRD6+zTHjvA+j7rMfETmkqjNBnxvF5fJpAA92f38QwOwI+yIJsvfAkVV/aK32MvYe\nOJKRRaMT9zmleY3iPFba9zau43ntJ4iHnzs20vFtjhnnfRh1n1GwFXQF8EMROSQit3df+4Cqvg4A\n3Z/v99pQRG4XkYMicvDEiROjW0xCc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AETk\nkwDeUNVDWduSEltV9cMAPg7g8yLy0awNSoA1AD4M4OuqOg3gFIBd2ZqUHF2X0nUAHs3aliQQkXUA\nPg3gMgAXAzhPRD6brVXxo6ovAfhDAH8J4AcAFgEs2W5PQe+wFcB1IvIqgG8D2C4iD2VrUnKo6vHu\nzzfQ8bd+JFuLEuFnAH6mqs91/78fHYEvKx8H8Lyq/jxrQxLidwG8oqonVLUN4DsAfidjmxJBVb+p\nqh9W1Y8CeBOAlf8coKADAFT1K6p6iapuQOex9SlVLd3oDwAicp6I/Jr7O4Br0HnMKxWq+v8AHBMR\nt8P0xwD8XYYmJc0tKKm7pctRAFeLyKSICDr386WMbUoEEXl/9+d6ADsR4r4yy2X8+ACA73a+E1gD\n4M9V9QfZmpQY/w7At7ruiJ8C+NcZ25MIXV/rPwfwb7O2JSlU9TkR2Q/geXRcEAso74rRx0TkQgBt\nAJ9X1ZO2G3KlKCGElAS6XAghpCRQ0AkhpCRQ0AkhpCRQ0AkhpCRQ0AkhpCRQ0AkhpCRQ0AkhpCRQ\n0AkhpCT8f9F55igLg2gbAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x109316748>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "x = x[y < 50]\n",
    "y = y[y < 50]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "x_train, x_test, y_train, y_test = train_test_split(x, y, test_size = 0.2, random_state = 666)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(392,)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_train.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(98,)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEKCAYAAAAfGVI8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3W2MJMd5H/D/s8Nd+OaONHVzJ4UR\ntbMKIghyDEQSF4wSAgQsmkZMG5ISKALt0eEgCVl7JSTHOIAt44BEAXKAHASJ+CEkfRCprLljvVgW\nQ0GWCQmylcCGxGRPsmLJtEBZuWNoKuJxjxRf4Xt78qGnNb29Vd3VPV3d1d3/H9DY3ZmenurZ3Xq6\nq56qElUFERH111LTBSAiomYxEBAR9RwDARFRzzEQEBH1HAMBEVHPMRAQEfUcAwERUc8xEBAR9RwD\nARFRz13TdAFcHDlyRNfW1pouBhFRq5w5c+YZVT2at5/XQCAiZwG8AOAKgMuqui4ihwF8GsAagLMA\n3qOqz2YdZ21tDTs7Oz6LSkTUOSJyzmW/OpqGfkZV36yq67OfPwzgK6r6BgBfmf1MREQNaaKP4J0A\ntmbfbwF4VwNlICKiGd+BQAF8SUTOiMjG7LHXqOoPAGD29dWey0BERBl8dxbfoqpPicirAXxZRP7S\n9YWzwLEBAKurq77KR0TUe17vCFT1qdnXpwE8BOBmAD8UkRsAYPb1actrT6vquqquHz2a2+lNREQl\neQsEInJQRK6NvwfwcwC+DeDzAI7PdjsO4GFfZSAi8mo6BdbWgKWl6Ot02nSJSvH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.figure.Figure at 0x10c0b54e0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x_train, y_train, color='r')\n",
    "plt.xlabel(\"房间大小（平米）\")\n",
    "plt.ylabel(\"房价（万元）\")\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
